﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections;
//using System.Runtime.InteropServices;

namespace Backup_Manager_3CHIF
{
    class SoundFile : Item
    {

        //[DllImport("winmm.dll")]
        private System.Media.SoundPlayer player;

        //Calling Constructor of the base class
        public SoundFile(String path, String title) : base(path, title) 
        {
            player = new System.Media.SoundPlayer();
            player.SoundLocation = path;
        }
        
        //This Method is obsolete
        override public void play(){
            //only supports .wav
            Console.Write("SoundFile : play()");
            player.Play();

            //WMLib.WindowsMediaPlayer wplayer = new WMLib.WindowsMediaPlayer();
            //wplayer.URL = path;
            //wplayer.controls.play();
        }

        public void pause()
        {
            player.Stop();
            
        }

        //TODO: .mp3
    }
}
